package com.example.servicefeign.controller;

import com.example.servicefeign.api.HelloApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Value("${server.port}")//服务端口号
    String port;
    @Autowired
    HelloApi helloApi;
    @GetMapping("/hello")
    public String getHello(){
        return helloApi.getHello()+" feign:"+port;
    }

}
